/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package org.abc;

import java.util.Scanner;

/**
 * <p>Project: jse2303 - Ex4
 * <p>Powered by webrx On 2023-07-06 14:51:29
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex4 {
    public static void main(String[] args) {
        //double d = .5;
        //System.out.println(++d);

        //int a = Integer.parseInt(args[0]);
        //int b = Integer.parseInt(args[1]);
        //实例化对象 Scanner接收键盘输入
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.print("请输入两个整数：");
            int a = sc.nextInt();
            int b = sc.nextInt();
            if (a == 0 || b == 0) break;
            if (a % b == 0) {
                System.out.printf("%d ÷ %d = %d%n", a, b, a / b);
            } else {
                System.out.printf("%d ÷ %d = %d ... %d%n", a, b, a / b, a % b);
            }
        }
        System.out.println("程序结束");
    }
}
